home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 November / PCWNOV08.iso / Software / Freeware / NoteTab Light 5.7 / NoteTab_Setup.exe / {app} / Libraries / Euro.clb < prev    next >
Encoding:
Text File  |  2008-07-15  |  3.2 KB  |  99 lines

  1. = V5 MultiLine NoSorting TabWidth=30
  2.  
  3. H=";About this library"
  4. This library was written by Fookes Software to serve as a demonstration of the varied tasks that can be performed by the Editor Clipbook. You are free to customize it any way you like!
  5.  
  6.  
  7. H=";Instructions"
  8. Convert between any currency using the Euro currency as reference.
  9.  
  10. Activate the "Euro Exchange" Clip to open the wizard. The two lists in the Clip wizard display all the "Euro" currencies and a few others. You can also enter a currency that is not listed. The Clip wizard will prompt you to indicate the current exchange rate if you select a non-Euro currency.
  11.  
  12.  
  13.  
  14. H=";"
  15.  
  16.  
  17. H=";-----------------------------"
  18.  
  19.  
  20. H="Euro Exchange"
  21. ^!Set %Amount%=^?[Amount to convert=1]
  22. ^!Set %ConvertFrom%=^?[Currency=_Euro^=EU|German marks^=DM|French francs^=FF|Italian lire^=IL|Spanish pesetas^=SP|Dutch guilders^=DG|Belgian francs^=BF|Austrian schillings^=AS|Portuguese escudos^=PE|Finnish markka^=FM|Irish punts^=IP|Luxembourg francs^=LF|US dollars (prompts for current rate)^=US dollars|Swiss francs (prompts for current rate)^=Swiss francs|Japanese yen (prompts for current rate)^=Japanese yen]
  23. ^!Set %ConvertTo%=^?[Convert to=Euro^=EU|_German marks^=DM|French francs^=FF|Italian lire^=IL|Spanish pesetas^=SP|Dutch guilders^=DG|Belgian francs^=BF|Austrian schillings^=AS|Portuguese escudos^=PE|Finnish markka^=FM|Irish punts^=IP|Luxembourg francs^=LF|US dollars (prompts for current rate)^=US dollars|Australian dollars (prompts for current rate)^=AU dollars|Canadian dollars (prompts for current rate)^=CA dollars|British pounds (prompts for current rate)^=British pounds|Swiss francs (prompts for current rate)^=Swiss francs|Japanese yen (prompts for current rate)^=Japanese yen]
  24. ^!Clip "Get Rate" ^%ConvertFrom%
  25. ^!Set %ConvertFrom%=^%Currency%
  26. ;following converts to Euros
  27. ^!Set %Value%=^$Calc(^%Amount%/^%Rate%;8)$
  28. ^!Clip "Get Rate" ^%ConvertTo%
  29. ^!Set %ConvertTo%=^%Currency%
  30. ;following converts to chosen currency
  31. ^!Set %Value%=^$Calc(^%Value%*^%Rate%;2)$
  32.  
  33. ^!Info ^%Amount% ^%ConvertFrom% = ^%Value% ^%ConvertTo%
  34.  
  35. H=";-----------------------------"
  36.  
  37.  
  38. H=";"
  39.  
  40.  
  41. H="_Get Rate"
  42. ;Rate for one Euro
  43.  
  44. ^!Set %CurrencyCode%=^&
  45. ^!IfLabelExist ^%CurrencyCode% ^%CurrencyCode% ELSE Unknown
  46.  
  47. :Unknown
  48. ^!Set %Currency%=^%CurrencyCode%; %Rate%=^?{How many ^%CurrencyCode% for 1 Euro?}
  49. ^!IfTrue ^$IsEmpty(^%Rate%)$ Exit
  50. ^!If ^%Rate% = 0 Exit
  51. ^!Goto End
  52.  
  53. :EU
  54. ^!Set %Currency%=Euro; %Rate%=1.0
  55. ^!Goto End
  56.  
  57. :DM
  58. ^!Set %Currency%=German marks; %Rate%=1.95583
  59. ^!Goto End
  60.  
  61. :FF
  62. ^!Set %Currency%=French francs; %Rate%=6.55957
  63. ^!Goto End
  64.  
  65. :IL
  66. ^!Set %Currency%=Italian lire; %Rate%=1936.27
  67. ^!Goto End
  68.  
  69. :SP
  70. ^!Set %Currency%=Spanish pesetas; %Rate%=166.386
  71. ^!Goto End
  72.  
  73. :DG
  74. ^!Set %Currency%=Dutch guilders; %Rate%=2.20371
  75. ^!Goto End
  76.  
  77. :BF
  78. ^!Set %Currency%=Belgian francs; %Rate%=40.3399
  79. ^!Goto End
  80.  
  81. :AS
  82. ^!Set %Currency%=Austrian schillings; %Rate%=13.7603
  83. ^!Goto End
  84.  
  85. :PE
  86. ^!Set %Currency%=Portuguese escudos; %Rate%=200.482
  87. ^!Goto End
  88.  
  89. :FM
  90. ^!Set %Currency%=Finnish markka; %Rate%=5.94573
  91. ^!Goto End
  92.  
  93. :IP
  94. ^!Set %Currency%=Irish punts; %Rate%=0.78756
  95. ^!Goto End
  96.  
  97. :LF
  98. ^!Set %Currency%=Luxembourg francs; %Rate%=40.3399
  99.